import Vue from 'vue'
import Vuex from 'vuex'
import mutations from './mutations'
import actions from './action'

Vue.use(Vuex)

const state = {
  pageOpenedList: [],
  cachePage: [],
  currentPage: "",
  userInfo: {
    token: "",
    permission: "",
    userType: "",
  },
  adEditId: '',
  saveDomain: '',
  adCopy: false,
  countryOptions: [
    {label: 'China', value: '86'},
    {label: 'Taiwan', value: '886'},
    {label: 'Singapore', value: '65'},
    {label: 'Malaysia', value: '60'},
    {label: 'Indonesia', value: '62'},
    {label: 'Philippine', value: '880'},
    {label: 'Vietnam', value: '84'},
  ],
  productTypeOptions: [
    {label: 'type01', value: '1'},
    {label: 'type02', value: '2'},
    {label: 'type03', value: '3'},
    {label: 'type04', value: '4'},
    {label: 'type05', value: '5'},
    {label: 'type06', value: '6'},
    {label: 'type07', value: '7'},
    {label: 'type08', value: '8'},
    {label: 'type09', value: '9'},
    {label: 'type10', value: '10'},
    {label: 'type11', value: '11'},
    {label: 'type12', value: '12'},
    {label: 'type13', value: '13'},
    {label: 'type14', value: '14'},
    {label: 'type15', value: '15'},
    {label: 'type16', value: '16'},
  ],
  warehouseOptions: []
};

export default new Vuex.Store({
  state,
  actions,
  mutations,
})
